#include<bits/stdc++.h>

using namespace std;

int main() {
    int n = 120;
    for (int i = 1; i <= n; i++) {//O(n)
        if (n % i == 0) {
            cout << i << " ";
        }
    }
    cout<<endl;



}